package com.xs.designpattern;

import lombok.AllArgsConstructor;

/**
 * 盗贼
 *
 * @author xs
 */
@AllArgsConstructor
public class HalflingThief {
    private StealingMethod method;

    /**
     * 偷
     */
    public void steal() {
        method.steal();
    }

    /**
     * 改变偷取方法
     *
     * @param method 偷取方法
     */
    public void changeMethod(StealingMethod method) {
        this.method = method;
    }
}
